﻿IF EXISTS (SELECT * from sys.procedures p left join sys.schemas s on p.schema_id = s.schema_id where p.name='search_update' and s.name='Meta')
DROP PROCEDURE [Meta].search_update
GO
CREATE PROCEDURE [Meta].search_update 
@PK uniqueidentifier, 
@DisplayName nvarchar(50), 
@ItemType varchar(30), 
@SearchField nvarchar(450)
AS
BEGIN
UPDATE [Meta].[Search] 
SET	[display_name] = @DisplayName ,
	[item_type] = @ItemType ,
	[search_field] = @SearchField 
WHERE
	[id_reference] = @PK 
END